﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;


/// <summary>
/// 物料产品分类表
/// </summary>
public class MdItemType :Entity<int>
{
    /// <summary>
    /// 物料类型编码
    /// </summary>
    [Required]
    [MaxLength(64)]
    public string ItemTypeCode { get; set; } = string.Empty;

    /// <summary>
    /// 物料类型名称
    /// </summary>
    [Required]
    [MaxLength(255)]
    public string ItemTypeName { get; set; } = string.Empty;

    /// <summary>
    /// 父类型ID
    /// </summary>
    [Required]
    public long ParentTypeId { get; set; } = 0;

    /// <summary>
    /// 所有父节点ID（当前节点所有层级的父节点，各值之间用逗号分隔）
    /// </summary>
    [Required]
    [MaxLength(255)]
    public string Ancestors { get; set; }=string.Empty;

    /// <summary>
    /// 物料产品标识（物料 item 产品 product）
    /// </summary>
    [Required]
    [MaxLength(20)]
    public string ItemOrProduct { get; set; } = string.Empty;

    /// <summary>
    /// 排序顺序
    /// </summary>
    public int OrderNum { get; set; } = 1;

    /// <summary>
    /// 是否启用（默认 'Y'）
    /// </summary>
    [Required]
    [MaxLength(1)]
    public char EnableFlag { get; set; } = 'Y';

    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(500)]
    public string Remark { get; set; } = string.Empty;

    /// <summary>
    /// 创建人
    /// </summary>
    [MaxLength(64)]
    public string? CreateBy { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime? CreateTime { get; set; }

    /// <summary>
    /// 更新人
    /// </summary>
    [MaxLength(64)]
    public string? UpdateBy { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }
}

